.class public Les/bk0;
.super Ljava/lang/Object;
.source "CleanSpaceTask.java"

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field private a:Les/zn0;


# direct methods
.method public constructor <init>(Les/zn0;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Les/bk0;->a:Les/zn0;

    return-void
.end method


# virtual methods
.method public run()V
    .locals 6

    .line 1
    iget-object v0, p0, Les/bk0;->a:Les/zn0;

    if-nez v0, :cond_0

    return-void

    .line 2
    :cond_0
    invoke-static {}, Les/vj0;->c()Les/vj0;

    move-result-object v0

    iget-object v1, p0, Les/bk0;->a:Les/zn0;

    invoke-virtual {v0, v1}, Les/vj0;->a(Les/zn0;)Les/nj0;

    move-result-object v0

    if-nez v0, :cond_1

    return-void

    .line 3
    :cond_1
    invoke-static {}, Les/uk0;->a()Les/uk0;

    move-result-object v1

    const-string v2, "cleanspace_task"

    invoke-virtual {v1, v2, v0}, Les/uk0;->a(Ljava/lang/String;Les/nj0;)V

    .line 4
    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v1

    .line 5
    invoke-static {}, Les/lk0;->s()D

    move-result-wide v2

    const-wide/high16 v4, 0x3ff0000000000000L    # 1.0

    add-double/2addr v2, v4

    .line 6
    iget-object v4, p0, Les/bk0;->a:Les/zn0;

    invoke-virtual {v4}, Les/zn0;->c0()J

    move-result-wide v4

    long-to-double v4, v4

    invoke-static {v4, v5}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v2, v2, v4

    invoke-static {v2, v3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Double;->longValue()J

    move-result-wide v2

    .line 7
    invoke-static {}, Les/lk0;->l()Les/ri0;

    move-result-object v4

    if-eqz v4, :cond_2

    .line 8
    invoke-static {}, Les/lk0;->l()Les/ri0;

    move-result-object v4

    invoke-interface {v4}, Les/ri0;->c()V

    .line 9
    :cond_2
    invoke-static {}, Les/ck0;->a()V

    .line 10
    invoke-static {}, Les/ck0;->b()V

    const-wide/16 v4, 0x0

    .line 11
    :try_start_0
    invoke-virtual {v1}, Ljava/io/File;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/ss/android/socialbase/downloader/m/f;->c(Ljava/lang/String;)J

    move-result-wide v4
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v1

    .line 12
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    :goto_0
    cmp-long v1, v4, v2

    if-ltz v1, :cond_3

    const/4 v1, 0x1

    goto :goto_1

    :cond_3
    const/4 v1, 0x0

    :goto_1
    if-eqz v1, :cond_4

    .line 13
    invoke-static {}, Les/dk0;->d()Les/dk0;

    move-result-object v1

    invoke-virtual {v1}, Les/dk0;->a()Landroid/util/LongSparseArray;

    move-result-object v1

    iget-object v2, p0, Les/bk0;->a:Les/zn0;

    invoke-virtual {v2}, Les/zn0;->N0()I

    move-result v2

    int-to-long v2, v2

    const-string v4, "1"

    invoke-virtual {v1, v2, v3, v4}, Landroid/util/LongSparseArray;->put(JLjava/lang/Object;)V

    .line 14
    invoke-static {}, Les/uk0;->a()Les/uk0;

    move-result-object v1

    const-string v2, "cleanspace_download_after_quite_clean"

    invoke-virtual {v1, v2, v0}, Les/uk0;->a(Ljava/lang/String;Les/nj0;)V

    .line 15
    invoke-static {}, Les/lk0;->a()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/ss/android/socialbase/downloader/downloader/g;->a(Landroid/content/Context;)Lcom/ss/android/socialbase/downloader/downloader/g;

    move-result-object v0

    iget-object v1, p0, Les/bk0;->a:Les/zn0;

    invoke-virtual {v1}, Les/zn0;->N0()I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/ss/android/socialbase/downloader/downloader/g;->e(I)V

    .line 16
    invoke-static {}, Les/dk0;->d()Les/dk0;

    move-result-object v0

    iget-object v1, p0, Les/bk0;->a:Les/zn0;

    invoke-virtual {v1}, Les/zn0;->Q0()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Les/dk0;->a(Ljava/lang/String;)V

    goto :goto_4

    .line 17
    :cond_4
    invoke-static {}, Les/lk0;->l()Les/ri0;

    move-result-object v1

    const-string v4, "cleanspace_window_show"

    const-string v5, "show_dialog_result"

    if-eqz v1, :cond_6

    .line 18
    invoke-static {}, Les/lk0;->l()Les/ri0;

    move-result-object v1

    invoke-interface {v1}, Les/ri0;->b()Z

    move-result v1

    if-eqz v1, :cond_5

    .line 19
    invoke-static {}, Les/lk0;->l()Les/ri0;

    move-result-object v1

    invoke-interface {v1}, Les/ri0;->a()Z

    move-result v1

    if-eqz v1, :cond_7

    .line 20
    invoke-static {}, Les/lk0;->l()Les/ri0;

    move-result-object v1

    iget-object v4, p0, Les/bk0;->a:Les/zn0;

    invoke-virtual {v4}, Les/zn0;->N0()I

    move-result v4

    iget-object v5, p0, Les/bk0;->a:Les/zn0;

    invoke-virtual {v5}, Les/zn0;->Q0()Ljava/lang/String;

    move-result-object v5

    invoke-interface {v1, v4, v5, v2, v3}, Les/ri0;->a(ILjava/lang/String;J)V

    .line 21
    invoke-static {}, Les/uk0;->a()Les/uk0;

    move-result-object v1

    const-string v2, "cleanspace_need_user_clean"

    invoke-virtual {v1, v2, v0}, Les/uk0;->a(Ljava/lang/String;Les/nj0;)V

    goto :goto_4

    .line 22
    :cond_5
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V

    const/4 v2, 0x4

    .line 23
    :try_start_1
    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v1, v5, v2}, Lorg/json/JSONObject;->putOpt(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_2

    :catch_1
    move-exception v2

    .line 24
    invoke-virtual {v2}, Lorg/json/JSONException;->printStackTrace()V

    .line 25
    :goto_2
    invoke-static {}, Les/uk0;->a()Les/uk0;

    move-result-object v2

    invoke-virtual {v2, v4, v1, v0}, Les/uk0;->a(Ljava/lang/String;Lorg/json/JSONObject;Les/nj0;)V

    goto :goto_4

    .line 26
    :cond_6
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V

    const/4 v2, 0x3

    .line 27
    :try_start_2
    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v1, v5, v2}, Lorg/json/JSONObject;->putOpt(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_2
    .catch Lorg/json/JSONException; {:try_start_2 .. :try_end_2} :catch_2

    goto :goto_3

    :catch_2
    move-exception v2

    .line 28
    invoke-virtual {v2}, Lorg/json/JSONException;->printStackTrace()V

    .line 29
    :goto_3
    invoke-static {}, Les/uk0;->a()Les/uk0;

    move-result-object v2

    invoke-virtual {v2, v4, v1, v0}, Les/uk0;->a(Ljava/lang/String;Lorg/json/JSONObject;Les/nj0;)V

    :cond_7
    :goto_4
    return-void
.end method
